﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace InvariantWM.NormalizerUtils
{
    public class Transform2D
    {
        double m_a;
        double m_b;
        double m_c;
        double m_d;
        double m_e;
        double m_f;

        public Transform2D(double a, double b, double c, double d, double e, double f)
        {
            this.m_a = a;
            this.m_b = b;
            this.m_c = c;
            this.m_d = d;
            this.m_e = e;
            this.m_f = f;
        }

        public Point2D Transform(Point2D p)
        {
            Point2D outPoint = new Point2D(m_a * p.getX() + m_c * p.getY() + m_e, m_b * p.getX() + m_d * p.getY() + m_f);
            return outPoint;
        }
    }
}
